package perceptronMathieu.function;

public class Sphere implements IFunction
{
	private final int	dimension;

	public Sphere(int dimension)
	{
		this.dimension = dimension;
	}

	public int getDimension()
	{
		return dimension;
	}

	public double fitness(double linkValues[])
	{
		double fitness = 0.0;
		for (int i = 0; i < linkValues.length; ++i)
		{
			fitness += linkValues[i] * linkValues[i];
		}
		return fitness;
	}

	public String toString()
	{
		return "";
	}

}
